public class HanoiTower {

    private char startPole = 'A';
    private char targetPole = 'C';
    private char tempPole = 'B';

    public void moveDisks(int diskCount) {
        moveDisks(diskCount, startPole, targetPole, tempPole);
    }

    private void moveDisks(int diskCount, char fromPole, char toPole, char tempPole) {
        if (diskCount <= 0) {
            return;
        }

        moveDisks(diskCount - 1, fromPole, tempPole, toPole);
        System.out.println("Move disk " + diskCount + " from " + fromPole + " to " + toPole);
        moveDisks(diskCount - 1, tempPole, toPole, fromPole);
    }

    public static void main(String[] args) {
        HanoiTower hanoiTower = new HanoiTower();
        hanoiTower.moveDisks(3);
    }
}